/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package co.com.entidad;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 *
 * @author 841756
 */
@Entity
@Table(name = "tblconceptospermanentes")
@NamedQueries({
    @NamedQuery(name = "Tblconceptospermanentes.findAll", query = "SELECT t FROM Tblconceptospermanentes t"),
    @NamedQuery(name = "Tblconceptospermanentes.findByIdeEmp", query = "SELECT t FROM Tblconceptospermanentes t WHERE t.ideEmp = :ideEmp"),
    @NamedQuery(name = "Tblconceptospermanentes.findByNomEmp", query = "SELECT t FROM Tblconceptospermanentes t WHERE t.nomEmp = :nomEmp"),
    @NamedQuery(name = "Tblconceptospermanentes.findByConcepto", query = "SELECT t FROM Tblconceptospermanentes t WHERE t.concepto = :concepto"),
    @NamedQuery(name = "Tblconceptospermanentes.findByReferencia", query = "SELECT t FROM Tblconceptospermanentes t WHERE t.referencia = :referencia"),
    @NamedQuery(name = "Tblconceptospermanentes.findByValor", query = "SELECT t FROM Tblconceptospermanentes t WHERE t.valor = :valor"),
    @NamedQuery(name = "Tblconceptospermanentes.findByCantidad", query = "SELECT t FROM Tblconceptospermanentes t WHERE t.cantidad = :cantidad")})
public class Tblconceptospermanentes implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 12)
    @Column(name = "ide_emp")
    private String ideEmp;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 25)
    @Column(name = "nom_emp")
    private String nomEmp;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 15)
    @Column(name = "concepto")
    private String concepto;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 4)
    @Column(name = "referencia")
    private String referencia;
    @Basic(optional = false)
    @NotNull
    @Column(name = "valor")
    private double valor;
    @Basic(optional = false)
    @NotNull
    @Column(name = "cantidad")
    private long cantidad;
    @JoinColumn(name = "cod_compania", referencedColumnName = "cod_compania")
    @ManyToOne(optional = false)
    private Tblcompania codCompania;
    @JoinColumn(name = "id_estado", referencedColumnName = "id_estado")
    @ManyToOne(optional = false)
    private TblEstado idEstado;

    public Tblconceptospermanentes() {
    }

    public Tblconceptospermanentes(String ideEmp) {
        this.ideEmp = ideEmp;
    }

    public Tblconceptospermanentes(String ideEmp, String nomEmp, String concepto, String referencia, double valor, long cantidad) {
        this.ideEmp = ideEmp;
        this.nomEmp = nomEmp;
        this.concepto = concepto;
        this.referencia = referencia;
        this.valor = valor;
        this.cantidad = cantidad;
    }

    public String getIdeEmp() {
        return ideEmp;
    }

    public void setIdeEmp(String ideEmp) {
        this.ideEmp = ideEmp;
    }

    public String getNomEmp() {
        return nomEmp;
    }

    public void setNomEmp(String nomEmp) {
        this.nomEmp = nomEmp;
    }

    public String getConcepto() {
        return concepto;
    }

    public void setConcepto(String concepto) {
        this.concepto = concepto;
    }

    public String getReferencia() {
        return referencia;
    }

    public void setReferencia(String referencia) {
        this.referencia = referencia;
    }

    public double getValor() {
        return valor;
    }

    public void setValor(double valor) {
        this.valor = valor;
    }

    public long getCantidad() {
        return cantidad;
    }

    public void setCantidad(long cantidad) {
        this.cantidad = cantidad;
    }

    public Tblcompania getCodCompania() {
        return codCompania;
    }

    public void setCodCompania(Tblcompania codCompania) {
        this.codCompania = codCompania;
    }

    public TblEstado getIdEstado() {
        return idEstado;
    }

    public void setIdEstado(TblEstado idEstado) {
        this.idEstado = idEstado;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (ideEmp != null ? ideEmp.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Tblconceptospermanentes)) {
            return false;
        }
        Tblconceptospermanentes other = (Tblconceptospermanentes) object;
        if ((this.ideEmp == null && other.ideEmp != null) || (this.ideEmp != null && !this.ideEmp.equals(other.ideEmp))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "" + concepto + "";
    }
    
}
